<!DOCTYPE html>
<html lang="en">
    <head>
        {include file="public/header"}  
    </head>
    <body>
        <div class="col-lg-2">
            <div class="form-group">
                <button class="btn btn-primary" id="create"><span class="fa fa-plus"></span>添加课本</button>
            </div>
        </div>
        <div class="col-lg-10 col-sm-10">
            <div class="">
                <form id="search" class="form form-horizontal" action="search">
                    <div class="form-group">
                        <div class="col-lg-6 col-sm-6">
                            <input class="form-control" type="text" name="keyword" value="" placeholder="输入试卷名称查询">
                        </div>
                        <div class="col-lg-3 col-sm-3">
                            <input type="submit" class="btn btn-primary" value="确定">
                        </div>
                    </div>
                </form>
            </div>
        </div>

        <div class="col-lg-12">
            <table class="table table-striped table-bordered table-hover">
                <thead>
                    <tr>
                        <th>编号</th>
                        <th>名称</th>
                        <th>所属类型</th>
                        <th>章节</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    {volist name="book_data" id="v"}
                    <tr id="tr-{$v.bk_id}">
                        <td>{$v.bk_sn}</td>
                        <td>{$v.bk_name}</td>
                        <td>{$v.bt_name}</td>
                        <td>
                            <div class="btn btn-info btn-xs" data-id="chapter-add-{$v.bk_id}" role="newtab" data-href="__admin__/chapter/add.html" data-text="{$v.bk_name}-添加章节">添加章节</div>
                            <div class="btn btn-default btn-xs" data-id="chapter-list-{$v.bk_id}" role="newtab" data-href="__admin__/book/chapter.html?id={$v.bk_id}" data-text="{$v.bk_name}">查看章节</div>
                        </td>                            
                        <td>
                            <div role="newtab" class="btn btn-primary btn-xs" data-id="bk-e-{$v.bk_id}" data-href="__admin__/book/edit.html?id={$v.bk_id}" data-text="{$v.bk_name}">编辑</div>
                            <button class="btn btn-danger btn-xs" data-id="{$v.bk_id}" id="remove">删除</button>
                        </td>
                    </tr>
                    {/volist}
                </tbody>
            </table>
            {$book_data}
        </div>
        {include file="public/board" /}
        {include file="public/remove" /}
        {include file="public/javascript" /}
        {include file="public/jqueryform" /}
        <script type="text/javascript" src="/admin/script/book/index.js"></script>
    </body>
</html>
